<?php
echo '<div style="background: white; width: 600px; padding: 10px">';
echo "<h3>Primary artist</h3>";

echo $track["Artist"]["name"]."<br/>";

echo '<form id="set_primary_artist">';
echo $ajax->autoComplete('Artist.name', array("minChars" => 4)).'<a href="javascript: setPrimaryArtist('.$track['Track']['id'].')">Update</a></form><br/>';

echo "<h3>Track artists</h3><ul>";

foreach ($track_artists as $track_artist)
{
	echo "<li>".$track_artist["Artist"]["name"];
	echo $html->link("Make Primary", "javascript: makePrimary(".$track['Track']['id'].",".$track_artist["Artist"]['id'].")");
	echo $html->link("Delete", "javascript: deleteTrackArtist(".$track['Track']['id'].",".$track_artist["Artist"]['id'].")");
	echo "</li>";
}

echo "</ul><br/>";

echo '<form id="add_track_artist">';
echo $ajax->autoComplete('Artist.name', null, array("id" => "add_track_artist_autocomplete", "minChars" => 4)).'<a href="javascript: addTrackArtist('.$track['Track']['id'].')">Add</a></form><br/>';

echo "</div>";
?>